/* eslint-disable no-param-reassign */
/* eslint-disable no-nested-ternary */
import Toast from 'tdesign-miniprogram/toast/index';

Component({
  options: {
    multipleSlots: true,
    addGlobalClass: true,
  },
  show: {
    type: Boolean,
    value: false,
    observer() {
      this.initData();
    },
  },
  properties: {
    currentPrice: {
      type: Number,
      value: 0,
    },
    stepMoney: {
      type: Number,
      value: 0,
    }
  },

  data: {
    currentPrice: 0,
    stepMoney: 0
  },

  methods: {
    initData() {
      const { currentPrice, stepMoney } = this.properties;
      console.log(this.properties)
      this.setData({
        currentPrice, stepMoney
      });

    },

    handlePopupHide() {
      this.triggerEvent('closeSpecsPopup', {
        show: false,
      });
    },

    addPrice() {
      this.triggerEvent('addPrice');
    },

  },
});
